package com.daify.threadlearn.chapter01.order03;

import java.awt.*;

/**
 * @author daify
 * @date 2019-06-04
 */
public class SafeListener {

    private final EventListener listener;

    private SafeListener() {
        listener = new EventListener() {
            public void onEvent(Event event) {
                System.out.println(event);
            }
        };
    }

    public static SafeListener newInstance() {
        SafeListener safeListener = new SafeListener();

        return safeListener;
    }

}
